package com.augurit.common.common.http.kt.request

import okhttp3.RequestBody
import retrofit2.http.*

/**
 *  author : yanghaozhang
 *  date : 2022/5/5 10:50
 *  description :
 */
interface ApiService {

    @GET
    suspend fun get(@Url url: String, @QueryMap maps: Map<String, String?>, @HeaderMap headers: Map<String, String>): String

    @POST
    @FormUrlEncoded
    suspend fun post(@Url url: String, @FieldMap maps: Map<String, String?>, @HeaderMap headers: Map<String, String>): String

    @POST
    @Headers("Content-Type: application/json", "Accept: application/json")
    suspend fun postJson(@Url url: String, @Body jsonBody: RequestBody, @HeaderMap headers: Map<String, String>): String

    @POST
    suspend fun postBody(@Url url: String, @Body obj: Any?, @HeaderMap headers: Map<String, String>): String

    @POST
    suspend fun postBody(@Url url: String, @Body body: RequestBody, @HeaderMap headers: Map<String, String>): String

/*
    @POST
    suspend fun putBody(@Url url: String, @Body obj: Any?, @HeaderMap headers: Map<String, String>): String

    @Multipart
    @POST
    suspend fun uploadFlie(
        @Url fileurl: String,
        @Part("description") description: RequestBody,
        @Part("files") file: MultipartBody.Part
    ): String

    @Multipart
    @POST
    suspend fun uploadFiles(@Url url: String, @PartMap maps: Map<String, RequestBody>): String

    @Multipart
    @POST
    suspend fun uploadFiles(@Url url: String, @Part parts: List<MultipartBody.Part?>): String*/
}